home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-07 | 1.4 KB | 68 lines | [TEXT/MPS ] |
- (*
- waitForPlayVideo - Wait until the current play sequence finishes.
-
- To compile and link this file using Macintosh Programmer's Workshop,
-
- pascal -w waitForPlayVideo.p
-
- link -m ENTRYPOINT -o HyperCommands -rt XCMD=8009 -sn Main=waitForPlayVideo ∂
- waitForPlayVideo.p.o "{MPW}"Libraries:interface.o
-
- Copyright © 1987,88 Apple Computer, Inc.
-
- 9/87 - Initial coding by Harry R. Chesley.
- 2/88 - Changed for new interface specification by Harry R. Chesley.
- *)
-
- {$R-}
-
- {$S waitForPlayVideo } { Segment name must be the same as the command name. }
-
- unit DummyUnit;
-
- interface
-
- uses MemTypes, QuickDraw, OSIntf, HyperXCmd;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- implementation
-
- type
-
- Str31 = String[31];
-
- procedure waitForPlayVideo(paramPtr: XCmdPtr); forward;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- begin
- waitForPlayVideo(paramPtr);
- end;
-
- procedure waitForPlayVideo(paramPtr: XCmdPtr);
-
- var str: str255;
-
- {$I XCmdGlue.inc}
-
- procedure Fail(errMsg: Str255); { set theResult and quit }
- begin
- paramPtr^.returnValue := PasToZero(errMsg);
- exit(waitForPlayVideo);
- end;
-
- {$I VideoUtil.inc}
-
- begin
- if paramPtr^.paramCount <> 0 then Fail('parameter count is not 0');
-
- { Wait until the player is no longer playing. }
- repeat
- { Clear out any pending input. }
- EvalAndDispose('recvUpTo(empty,0,empty)');
- until not StringEqual(EvalStr('"play" is in videoStatus()'),'true');
- end;
-
- end.
-